# -*- coding: utf-8 -*-
import os
from flask.ext.openid import OpenID
from config import basedir

__author__ = 'gongqf'
from flask_login import LoginManager
from flask import Flask
from flask_appconfig import AppConfig
from flask_debugtoolbar import DebugToolbarExtension
login_manager = LoginManager()
def create_app(configfile=None):
    app = Flask(__name__)
    AppConfig(app,configfile)
    # app.config.from_object(__name__)
    app.config.from_object('config')
    # toolbar=DebugToolbarExtension(app)
    return app

app=create_app()
login_manager.init_app(app)
login_manager.login_view='login'
oid=OpenID(app,os.path.join(basedir,'tmp'))
import views
